<%@ page import="com.ikun.pojo.TbUser" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
    TbUser tbUserNow = (TbUser) session.getAttribute("tbUserNow");
    if (null == tbUserNow){
        response.sendRedirect("index.jsp");
    }
%>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <!-- 自适应手机屏幕 -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes"/>

    <title>生机校园帮|我的帮帮</title>

    <script src="${ctx}/js/jquery-1.11.0.min.js"></script>
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all">
    <script src="${ctx}/layui/layui.js" charset="utf-8"></script>

    <link rel="stylesheet" href="${ctx}/css/home.css">
    <script>
        var ctx = "${ctx}";
    </script>
    <script>
        var user_id = "<%=tbUserNow.getId() %>";
        var nickname = "<%=tbUserNow.getNickname() %>";
        var user_pic = "<%=tbUserNow.getPic() %>";
        var realname = "<%=tbUserNow.getRealname() %>";
        var account = "<%=tbUserNow.getAccount() %>";
        var sex = "<%=tbUserNow.getSex() %>";
        var email = "<%=tbUserNow.getEmail() %>";
        var phone = "<%=tbUserNow.getPhone() %>";
        var department = "<%=tbUserNow.getDepartment() %>";
        var profession = "<%=tbUserNow.getProfession() %>";
        var classes = "<%=tbUserNow.getClasses() %>";
        var balance = "<%=tbUserNow.getBalance() %>";
    </script>
    <script src="${ctx}/js/home.js" charset="utf-8"></script>
</head>
<body>

<!-- 顶部 -->
<div id="top">
    <div id="head">
        <!-- 网页logo -->
        <div href="index.html" id="logo-text">School Help(SWJD)</div>
        <!-- 搜索框 -->
        <div id="search-box">
            <input type="text" name="search" id="search-content" placeholder="任务、帮手"/>
            <div id="search-button"></div>
        </div>
        <!-- 导航栏 -->
        <ul id="nav">
            <li>
                <a href="${ctx}/index.jsp" class="now-page">首页</a>
            </li>
            <li>
                <a href="" class="new-page">奖品中心</a>
            </li>
            <li>
                <a href="" class="new-page now">个人中心</a>
            </li>
            <li>
                <a href="javascript:openIframe();" class="new-page">发布任务</a>
            </li>
        </ul>
    </div>
    <div id="top-right">
        <div id="mypic" class="layui-anim layui-anim-rotate" onmouseenter="picOverStyle()"
             onmouseleave="picOutStyle()"></div>
        <div id="myinfo" class="layui-anim layui-anim-fadein" onmouseenter="picOverStyle()"
             onmouseleave="picOutStyle()">
            <div id="info-top">
                <div id="user_id" style="display: none">${tbUserNow.id}</div>
                <div id="mynickname"><span>${tbUserNow.nickname}</span></div>
                <div id="myprofession"><span>${tbUserNow.profession}</span></div>
                <div id="mybalance"><span>余额：${tbUserNow.balance}</span></div>
            </div>
            <div id="info-bottom">
                <a href="">
                    <div id="myhomepage">个人中心</div>
                </a>
                <a href="">
                    <div id="switchaccount">切换账号</div>
                </a>
                <a href="logoutAccount">
                    <div id="logout">退出</div>
                </a>
            </div>
        </div>
    </div>
</div>

<!-- 中间 -->
<div id="middle">
    <div id="middle-center">
        <div id="info-nav-box">
            <div class="info-nav-now" onclick="infoNavClick(this)"><img src="${ctx}/img/search.png"/><span>我的帮帮</span>
            </div>
            <div class="info-nav" onclick="infoNavClick(this)"><img src="${ctx}/img/search.png"/><span>个人信息</span></div>
            <div class="info-nav" onclick="infoNavClick(this)"><img src="${ctx}/img/search.png"/><span>我的私信</span></div>
            <div class="info-nav" onclick="infoNavClick(this)"><img src="${ctx}/img/search.png"/><span>我的钱包</span></div>
            <!-- <div class="info-nav" onclick="infoNavClick(this)"><img src="img/search.png" /><span>我的奖品</span></div> -->
        </div>
        <div id="info-show-box" class="layui-anim layui-anim-scale">
            <iframe src="${ctx}/page/myhelp.jsp" id="iframe-box" name="demo" scrolling="no"></iframe>
        </div>
    </div>
</div>

<!-- 底部 -->
<div id="bottom">
    <div id="url">生机校园帮&nbsp;&nbsp;&nbsp;&nbsp;2019&nbsp;&nbsp;©&nbsp;&nbsp;schoolhelp.com</div>
    <div id="develop">开发组：谭德&nbsp;&nbsp;吴山河&nbsp;&nbsp;刘宇昂&nbsp;&nbsp;汪俐</div>
</div>

</body>
</html>
